package com.lizhen.util;

import javax.ejb.Stateless;
import java.util.ArrayList;
import java.util.List;

/**
 * Session Bean implementation class LibrarySessionBean
 */
@Stateless(mappedName = "Stateless")
public class StatelessBean implements SessionBeanRemote {

    List<String> bookShelf = null;

    public StatelessBean() {
        bookShelf = new ArrayList<String>();
    }

    public void addBook(String bookName) {
        bookShelf.add(bookName);
    }

    public List<String> getBooks() {
        return bookShelf;
    }
}
